package io.gitee.yxsnake.framework.resource.api;

import com.github.lianjiatech.retrofit.spring.boot.core.RetrofitClient;
import io.gitee.yxsnake.framework.core.domain.Result;
import io.gitee.yxsnake.framework.core.exception.ServiceException;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * @author snake
 * @description 邮件服务
 * @since 2024/11/3 13:50
 */
@RetrofitClient(baseUrl = "${retrofit.pisces-resource-server:http://pisces-resource-server:21002/}")
public interface RemoteMailService {

    /**
     * 发送邮件
     *
     * @param to      接收人
     * @param subject 标题
     * @param text    内容
     */
    @GET(value = "inner/mail/send")
    Result<Boolean> send(@Query("to") String to, @Query("subject") String subject, @Query("text") String text) throws ServiceException;

}